<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <title>Hello</title>
</head>
<body>

Hello ${name}!

<hr/>
遍历数据模型中的list学生信息,数据为(stus)
<table>
    <tr>
        <td>序号</td>
        <td>姓名</td>
        <td>年龄</td>
        <td>金额</td>
        <td>出生日期</td>
    </tr>
    <#--  遍历List数据  -->
    <#list stus as sutdent>
        <tr>
            <td>${sutdent_index +1 }</td>
            <td <#if sutdent.name == "小明" > style="background-color: red" ></#if> ${sutdent.name}</td>
            <td>${sutdent.age}</td>
            <td <#if sutdent.money gt 300 >style="background-color: green"></#if>${sutdent.money}</td>
                        <td>${sutdent.birthday?date}</td>
        </tr>
    </#list>
</table>
<hr/>
<br/>
遍历数据模型中的Map数据
姓名:${stuMap['stu1'].name}
年龄:${stuMap['stu1'].age}
生日:${stuMap['stu1'].birthday?string("YYYY年MM月dd日")}
钱包:${stuMap['stu1'].money}
<hr/>
姓名:${stuMap['stu2'].name}
年龄:${stuMap['stu2'].age}
生日:${stuMap['stu2'].birthday?date}
钱包:${stuMap['stu2'].money}

<hr>
<br/>
遍历Map中的key
<#list stuMap?keys as key>
    姓名:${stuMap[key].name}
    年龄:${stuMap[key].age}
</#list>
</body>
</html>
